package com.example.reflect;

public class reflectTest1 {
    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
         Class c=Class.forName("com.example.bean.User");
//         通过反射机制创建对象
         Object o=c.newInstance();
        System.out.println(o);
    }
}
